package com.cxs.controller.index;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.cxs.controller.BaseController;
import com.cxs.service.index.IndexService;
import com.cxs.service.sys.UserService;
import com.cxs.util.MD5;
@Controller
public class IndexController extends BaseController{
	@Resource
	private UserService userService;
	@Resource
	private IndexService indexService;
	@RequestMapping(value = "/index", method = RequestMethod.GET)
	public String index() {
		Map<String,Object> paramMap = new HashMap<String, Object>(1);
		paramMap.put("account", "admin");
		paramMap.put("password", MD5.getInstance().getMD5ofStr("123456"));
		indexService.login(paramMap);
		return "index";
	}
	@RequestMapping(value = "/toIndex", method = RequestMethod.GET)
	public String toIndex() {
		return "to_index";
	}
	public static void main(String[] args) {
	}
}
